/*! \file BufferLocker.cpp
 *	\brief 
 *
 *	created:	2010/12/13
 *	created:	13:12:2010   16:29
 *	filename: 	C:\src\tactics-engine\libs\gd\BufferLocker.cpp
 *	file path:	C:\src\tactics-engine\libs\gd
 *	file base:	BufferLocker
 *	file ext:	cpp
 *	author:		Vitalii Trubchaninov
 *				vitalii.trubchaninov@ubisoft.com
 */
#include "gd/stdafx.h"
#include "gd/BufferLocker.h"
#include "gd/Buffer.h"

namespace tt{
namespace gd{

BufferLocker::BufferLocker( DeviceContext* deviceContext, Buffer& buffer )
: m_deviceContext(deviceContext)
, m_buffer(buffer)
{
	m_buffer.lock(m_deviceContext);
}

BufferLocker::~BufferLocker()
{
	m_buffer.unlock(m_deviceContext);
}

} //namespace gd
} //namespace tt